package orbitorcensor;

import java.util.Arrays;

import junit.framework.*;
import junit.textui.ResultPrinter;

import laboratoryQ.junit.ignore.patch.*;

public class MainSprintOrbitorTests {
	private MainSprintOrbitorTests() {}

	public static Test suite() {
		TestSuite suite = new TestSuite("Tests for Sprint Orbitor");

		suite.addTestSuite(TestObjectsLifetime.class);
		suite.addTestSuite(TestExperimentRun.class);

		return suite;
	}

	public static void main(String[] args) {
		ResultPrinter rp = new IgnorableResultPrinter(System.out);
		IgnorableTestRunner tr = new IgnorableTestRunner(rp);

		tr.doRun(suite(), !waitCanceled(args));

		int exitCode = tr.wasSummarySuccessful() ? 0 : 1;
		System.exit(exitCode);
	}

	private static boolean waitCanceled(String[] args) {
		return Arrays.asList(args).contains("nowait");
	}
}
